<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>SB Admin 2 - Bootstrap Admin Theme</title>
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- Bootstrap Core CSS -->
    <link href="/XiangAA/Public/home/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="/XiangAA/Public/home/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- DataTables CSS -->
    <link href="/XiangAA/Public/home/vendor/datatables-plugins/dataTables.bootstrap.css" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="/XiangAA/Public/home/vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet">
    
    <script src="/XiangAA/Public/home/vendor/jquery/jquery-1.11.2.min.js"></script>  

   
    <link href="/XiangAA/Public/home/bootstrap/css/bootstrap-datetimepicker.css" rel="stylesheet" />  
   
    <link href="/XiangAA/Public/home/bootstrap/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />  

    <script src="/XiangAA/Public/home/bootstrap/js/moment-with-locales.min.js"></script>  
    <script src="/XiangAA/Public/home/bootstrap/js/bootstrap-datetimepicker.min.js"></script>  




    <!-- Custom CSS -->
    <link href="/XiangAA/Public/home/dist/css/sb-admin-2.css" rel="stylesheet">
    <link href="/XiangAA/Public/home/dist/css/page.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/XiangAA/Public/home/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">


    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<div id="wrapper">

    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/XiangAA">商家后台管理</a>
        </div>
        <!-- /.navbar-header -->
        <ul class="nav navbar-top-links navbar-right">
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-messages">
                    <li>
                        <a href="#">
                            <div>
                                <strong>John Smith</strong>
                                <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                            </div>
                            <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <strong>John Smith</strong>
                                <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                            </div>
                            <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <strong>John Smith</strong>
                                <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                            </div>
                            <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>Read All Messages</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-messages -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-tasks fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-tasks">
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 1</strong>
                                    <span class="pull-right text-muted">40% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
                                        <span class="sr-only">40% Complete (success)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 2</strong>
                                    <span class="pull-right text-muted">20% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
                                        <span class="sr-only">20% Complete</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 3</strong>
                                    <span class="pull-right text-muted">60% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
                                        <span class="sr-only">60% Complete (warning)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 4</strong>
                                    <span class="pull-right text-muted">80% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
                                        <span class="sr-only">80% Complete (danger)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>See All Tasks</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-tasks -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-alerts">
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-comment fa-fw"></i> New Comment
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                                <span class="pull-right text-muted small">12 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-envelope fa-fw"></i> Message Sent
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-tasks fa-fw"></i> New Task
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-upload fa-fw"></i> Server Rebooted
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>See All Alerts</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-alerts -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-user">
                    <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
                    </li>
                    <li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
                    </li>
                    <li class="divider"></li>
                    <li><a href="<?php echo U('login/out');?>"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
                    </li>
                </ul>
                <!-- /.dropdown-user -->
            </li>
            <!-- /.dropdown -->
        </ul>
        <!-- /.navbar-top-links -->

        <div class="navbar-default sidebar" role="navigation">
            <div class="sidebar-nav navbar-collapse">
                <ul class="nav" id="side-menu">
                    <!--<li class="sidebar-search">-->
                        <!--<div class="input-group custom-search-form">-->
                            <!--<input type="text" class="form-control" placeholder="Search...">-->
                            <!--<span class="input-group-btn">-->
                                <!--<button class="btn btn-default" type="button">-->
                                    <!--<i class="fa fa-search"></i>-->
                                <!--</button>-->
                            <!--</span>-->
                        <!--</div>-->
                        <!--&lt;!&ndash; /input-group &ndash;&gt;-->
                    <!--</li>-->
          
                    <!--<li>-->
                        <!--<a href="#"><i class="fa fa-bar-chart-o fa-fw"></i>用户管理<span class="fa arrow"></span></a>-->
                        <!--<ul class="nav nav-second-level">-->
                            <!--<li>-->
                                <!--<a href="<?php echo U('Users/index');?>">显示</a>-->
                            <!--</li>-->
                        <!--</ul>-->
                    <!--</li>-->
                    <!--<li>-->
                        <!--<a href="#"><i class="fa fa-bar-chart-o fa-fw"></i>轮播图管理<span class="fa arrow"></span></a>-->
                        <!--<ul class="nav nav-second-level">-->
                            <!--<li>-->
                                <!--<a href="<?php echo U('lunbo/index');?>">显示</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="<?php echo U('lunbo/add');?>">添加</a>-->
                            <!--</li>-->
                        <!--</ul>-->
                    <!--</li>-->

                    <li>
                        <a href="#"><i class="fa fa-bar-chart-o fa-fw"></i>商品分类管理<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li>
                                <a href="<?php echo U('Type/index');?>">类别管理</a>
                            </li>
                            <li>
                                <a href="<?php echo U('Type/add');?>">类别添加</a>
                            </li>
                        </ul>
                        <!-- /.nav-second-level -->
                    </li>
                    <li>
                        <a href="#">
                            <i class="fa fa-bar-chart-o fa-fw"></i>商品<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li>
                                <a href="<?php echo U('goods/index');?>">商品管理</a>
                            </li>
                            <li>
                                <a href="<?php echo U('goods/add');?>">商品添加</a>
                            </li>
                        </ul>
                        <!-- /.nav-second-level -->
                    </li>
                 
                  
                    <!--<li>-->
                        <!--<a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Charts<span class="fa arrow"></span></a>-->
                        <!--<ul class="nav nav-second-level">-->
                            <!--<li>-->
                                <!--<a href="flot.html">Flot Charts</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="morris.html">Morris.js Charts</a>-->
                            <!--</li>-->
                        <!--</ul>-->
                        <!--&lt;!&ndash; /.nav-second-level &ndash;&gt;-->
                    <!--</li>-->
                    <!--<li>-->
                        <!--<a href="tables.html"><i class="fa fa-table fa-fw"></i> Tables</a>-->
                    <!--</li>-->
                    <!--<li>-->
                        <!--<a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>-->
                    <!--</li>-->
                    <!--<li>-->
                        <!--<a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>-->
                        <!--<ul class="nav nav-second-level">-->
                            <!--<li>-->
                                <!--<a href="panels-wells.html">Panels and Wells</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="buttons.html">Buttons</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="notifications.html">Notifications</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="typography.html">Typography</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="icons.html"> Icons</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="grid.html">Grid</a>-->
                            <!--</li>-->
                        <!--</ul>-->
                        <!--&lt;!&ndash; /.nav-second-level &ndash;&gt;-->
                    <!--</li>-->
                    <!--<li>-->
                        <!--<a href="#"><i class="fa fa-sitemap fa-fw"></i> Multi-Level Dropdown<span class="fa arrow"></span></a>-->
                        <!--<ul class="nav nav-second-level">-->
                            <!--<li>-->
                                <!--<a href="#">Second Level Item</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="#">Second Level Item</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="#">Third Level <span class="fa arrow"></span></a>-->
                                <!--<ul class="nav nav-third-level">-->
                                    <!--<li>-->
                                        <!--<a href="#">Third Level Item</a>-->
                                    <!--</li>-->
                                    <!--<li>-->
                                        <!--<a href="#">Third Level Item</a>-->
                                    <!--</li>-->
                                    <!--<li>-->
                                        <!--<a href="#">Third Level Item</a>-->
                                    <!--</li>-->
                                    <!--<li>-->
                                        <!--<a href="#">Third Level Item</a>-->
                                    <!--</li>-->
                                <!--</ul>-->
                                <!--&lt;!&ndash; /.nav-third-level &ndash;&gt;-->
                            <!--</li>-->
                        <!--</ul>-->
                        <!--&lt;!&ndash; /.nav-second-level &ndash;&gt;-->
                    <!--</li>-->
                    <!--<li>-->
                        <!--<a href="#"><i class="fa fa-files-o fa-fw"></i> Sample Pages<span class="fa arrow"></span></a>-->
                        <!--<ul class="nav nav-second-level">-->
                            <!--<li>-->
                                <!--<a href="blank.html">Blank Page</a>-->
                            <!--</li>-->
                            <!--<li>-->
                                <!--<a href="index.html">Login Page</a>-->
                            <!--</li>-->
                        <!--</ul>-->
                        <!--&lt;!&ndash; /.nav-second-level &ndash;&gt;-->
                    <!--</li>-->
                </ul>
            </div>
            <!-- /.sidebar-collapse -->
        </div>
        <!-- /.navbar-static-side -->
    </nav>

    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Tables</h1>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
        <div class="row">
            
<div class="panel panel-default">
    <div class="panel-heading">
        DataTables Advanced Tables                 
    </div>
                        <!-- /.panel-heading -->
    <div class="panel-body">
        <div id="dataTables-example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
        <div class="row">
            <div class="col-sm-6">
                <div class="row">
                    <form role="form" action="<?php echo U('sel');?>" method="get" enctype="multipart/form-data">
                        <div class="col-sm-6">
                        </div>
                        <div class="form-group input-group">
                            <input type="text" class="form-control" name="selname" value="关键字">
                            <input type="hidden"  name="id" value=" <?php echo ($st['id']); ?>">
                            <input type="hidden"  name="pid" value=" <?php echo ($st['pid']); ?>">
                            <span class="input-group-btn">
                                                <button type="submit" class="btn btn-default" ><i class="fa fa-search"></i>
                                                </button>
                                            </span>
                        </div>
                    </form>
                </div>
            </div>
            <div class="col-sm-6">

                 <a href="<?php echo U('seladd',['id'=>$li[0]['id']]);?>" class="btn btn-outline btn-warning">添加 【<?php echo ($li[0]['name']); ?>】的子类</a>
               </div>

            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <table width="100%" class="table table-striped table-bordered table-hover dataTable no-footer dtr-inline" id="" role="grid" aria-describedby="dataTables-example_info" style="width: 100%;">
                    <thead>
                        <tr >
                            <th>No.</th>
                            <th>分类名称</th>
                            <th>图片</th>
                            <th>状态</th>
                            <th>添加时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody> 
                        <?php if(is_array($list)): foreach($list as $key=>$val): ?><tr class="odd gradeX" align="center">
                                <td><?php echo ++$i;?></td>
                                <td><?php echo ($val["name"]); ?></td>
                                <td>
                                    <?php if($val['img'] == '' ): ?>没有图片
                                        <?php else: ?>
                                        <img width="100" src="/XiangAA<?php echo ($val['img']); ?>" alt=""><?php endif; ?>
                                </td>
                                <td class="center qj"><?php echo ($val['state'] == 1 ? '启用' : '隐藏'); ?></td>
                                <td class="center"><?php echo date('Y-m-d H:i:s',$val['time']);?></td>
                                 <td class="center">
                                    <a href="<?php echo U('sel',['id'=>$val['id']]);?>" class="btn btn-outline btn-primary">查看子类</a>
                                     <a href="javascript:void (0)" class="btn btn-outline btn-success" onclick="qj(this,<?php echo ($val['id']); ?>)"><?php echo ($val['state'] == 1 ? '隐藏' : '启用'); ?></a>
                                    <a href="<?php echo U('edit',['id'=>$val['id']]);?>" class="btn btn-outline btn-primary">编辑</a>
                                    <a href="<?php echo U('del',['id'=>$val['id']]);?>" class="btn btn-outline btn-danger" onclick="del(this,<?php echo ($val['id']); ?>)"class="del">删除</a>
                                </td>
                            </tr><?php endforeach; endif; ?>
                    </tbody> 
                </div>
            </div>
        </table>
                       
                    
                        <div class="row">
                            <div class="col-sm-6">
                            <div class="dataTables_info" id="dataTables-example_info" role="status" aria-live="polite">Showing 1 to 10 of 57 entries
                            </div>
                       </div>
                       <div class="col-sm-6">
                           <div class="dataTables_paginate paging_simple_numbers" id="dataTables-example_paginate">
                               <ul class="pagination">
                                   <li class="paginate_button previous " aria-controls="dataTables-example" tabindex="0" id="dataTables-example_previous"><a href="#">Previous</a>
                                   </li>
                                   <li class="paginate_button active" aria-controls="dataTables-example" tabindex="0">
                                    <a href="#">1</a>
                                   </li>
                                
                                   <li class="paginate_button next" aria-controls="dataTables-example" tabindex="0" id="dataTables-example_next"><a href="#">Next</a>
                                   </li>
                                 </ul>
                             </div>
                         </div>

                            <!-- /.table-responsive -->
                        
                        </div>
                        <!-- /.panel-body -->
                    </div>

            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
    </div>
    <!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->

<!-- jQuery -->
<script src="/XiangAA/Public/home/vendor/jquery/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="/XiangAA/Public/home/vendor/bootstrap/js/bootstrap.min.js"></script>

<!-- Metis Menu Plugin JavaScript -->
<script src="/XiangAA/Public/home/vendor/metisMenu/metisMenu.min.js"></script>

<!-- DataTables JavaScript -->
<script src="/XiangAA/Public/home/vendor/datatables/js/jquery.dataTables.min.js"></script>
<script src="/XiangAA/Public/home/vendor/datatables-plugins/dataTables.bootstrap.min.js"></script>
<script src="/XiangAA/Public/home/vendor/datatables-responsive/dataTables.responsive.js"></script>

<!-- Custom Theme JavaScript -->
<script src="/XiangAA/Public/home/dist/js/sb-admin-2.js"></script>


    


<!-- Page-Level Demo Scripts - Tables - Use for reference -->
<script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
            responsive: true,
            // "order": [[ 0, "desc" ]]
        });
    });
</script>
 

</body>

</html>